<template>
    <div class="bigbox">
        <div class="leftBox">
            <van-sidebar v-model="nowWZValue" @change="onChange">
                <van-sidebar-item title="电脑" />
                <van-sidebar-item title="高速扫描" />
                <van-sidebar-item title="平板扫描" />
                <van-sidebar-item title="打印机" />
                <van-sidebar-item title="A3扫描" />
                <van-sidebar-item title="大图扫描" />
                <van-sidebar-item title="交换机" />
                <van-sidebar-item title="监控" />
                <van-sidebar-item title="刻录机" />
                <van-sidebar-item title="电钻" />
                <van-sidebar-item title="加密狗" />
                <van-sidebar-item title="录入笔" />
                <van-sidebar-item title="插板" />
                <van-sidebar-item title="裁纸刀" />
                <van-sidebar-item title="其他" />
            </van-sidebar>

        </div>
        <div class="rightBox">
            <router-view></router-view>
        </div>
    </div>

</template>

<script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router"
let route = useRoute()
let router = useRouter()
//当前所在其他位置
let nowWZValue = ref(route.params.num)



const onChange = (index) => {
    nowWZValue.value = index
    router.push('/qt/qitaIndex/' + index)
};


</script>

<style lang="scss" scoped>
.bigbox {
    display: flex;
    height: 92vh;
}

.rightBox {
    padding: 5px;
    overflow-y: scroll;
    width: 79vw;
}

.leftBox {
    overflow-y: scroll;
    width: 20vw;
}
</style>